home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / windef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  7.2 KB  |  313 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. * windef.h -- Basic Windows Type Definitions                                *
  4. *                                                                           *
  5. * Copyright (c) 1985-1998, Microsoft Corp. All rights reserved.             *
  6. *                                                                           *
  7. ****************************************************************************/
  8.  
  9. #ifndef _WINDEF_        
  10. #define _WINDEF_
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. #ifndef WINVER
  17. #define WINVER 0x0400
  18. #endif /* WINVER */
  19.  
  20. /*
  21.  * BASETYPES is defined in ntdef.h if these types are already defined
  22.  */
  23.  
  24. #ifndef BASETYPES
  25. #define BASETYPES
  26. typedef unsigned long ULONG;
  27. typedef ULONG *PULONG;
  28. typedef unsigned short USHORT;
  29. typedef USHORT *PUSHORT;
  30. typedef unsigned char UCHAR;
  31. typedef UCHAR *PUCHAR;
  32. typedef char *PSZ;
  33. #endif  /* !BASETYPES */
  34.  
  35. #define MAX_PATH          260
  36.  
  37. #ifndef NULL
  38. #ifdef __cplusplus
  39. #define NULL    0
  40. #else
  41. #define NULL    ((void *)0)
  42. #endif
  43. #endif
  44.  
  45. #ifndef FALSE
  46. #define FALSE               0
  47. #endif
  48.  
  49. #ifndef TRUE
  50. #define TRUE                1
  51. #endif
  52.  
  53. #ifndef IN
  54. #define IN
  55. #endif
  56.  
  57. #ifndef OUT
  58. #define OUT
  59. #endif
  60.  
  61. #ifndef OPTIONAL
  62. #define OPTIONAL
  63. #endif
  64.  
  65. #undef far
  66. #undef near
  67. #undef pascal
  68.  
  69. #define far
  70. #define near
  71. #if (_MSC_VER >= 800)
  72. #define pascal __stdcall
  73. #else
  74. #define pascal
  75. #endif
  76.  
  77. #ifdef DOSWIN32
  78. #define cdecl _cdecl
  79. #ifndef CDECL
  80. #define CDECL _cdecl
  81. #endif
  82. #else
  83. #define cdecl
  84. #ifndef CDECL
  85. #define CDECL
  86. #endif
  87. #endif
  88.  
  89. #if UNDER_CE
  90. #ifdef _WIN32_WCE_EMULATION
  91. #ifdef _WIN32_WCE_EMULATION_CDECL
  92. #define __stdcall __cdecl
  93. #endif
  94. #else
  95. #define __stdcall __cdecl    // Note this doesn't match the desktop definition
  96. #endif // _WIN32_WCE_EMULATION
  97. #endif
  98.  
  99. #if (_MSC_VER >= 800)
  100. #define CALLBACK    __stdcall
  101. #define WINAPI      __stdcall
  102. #define WINAPIV     __cdecl
  103. #define APIENTRY    WINAPI
  104. #define APIPRIVATE  __stdcall
  105. #define PASCAL      __stdcall
  106. #else
  107. #define CALLBACK
  108. #define WINAPI
  109. #define WINAPIV
  110. #define APIENTRY    WINAPI
  111. #define APIPRIVATE
  112. #define PASCAL      pascal
  113. #endif
  114.  
  115. #define FAR                 far
  116. #define NEAR                near
  117. #ifndef CONST
  118. #define CONST               const
  119. #endif
  120.  
  121. typedef unsigned long       DWORD;
  122. typedef int                 BOOL;
  123. typedef unsigned char       BYTE;
  124. typedef unsigned short      WORD;
  125. typedef float               FLOAT;
  126. typedef FLOAT               *PFLOAT;
  127. typedef BOOL near           *PBOOL;
  128. typedef BOOL far            *LPBOOL;
  129. typedef BYTE near           *PBYTE;
  130. typedef BYTE far            *LPBYTE;
  131. typedef int near            *PINT;
  132. typedef int far             *LPINT;
  133. typedef WORD near           *PWORD;
  134. typedef WORD far            *LPWORD;
  135. typedef long far            *LPLONG;
  136. typedef DWORD near          *PDWORD;
  137. typedef DWORD far           *LPDWORD;
  138. typedef short far           *LPSHORT;
  139. typedef void far            *LPVOID;
  140. typedef CONST void far      *LPCVOID;
  141.  
  142. typedef int                 INT;
  143. typedef unsigned int        UINT;
  144. typedef unsigned int        *PUINT;
  145.  
  146. #ifndef NT_INCLUDED
  147. #include <winnt.h>
  148. #endif /* NT_INCLUDED */
  149.  
  150. /* Types use for passing & returning polymorphic values */
  151. typedef UINT WPARAM;
  152. typedef LONG LPARAM;
  153. typedef LONG LRESULT;
  154.  
  155. #ifndef NOMINMAX
  156.  
  157. #ifndef max
  158. #define max(a,b)            (((a) > (b)) ? (a) : (b))
  159. #endif
  160.  
  161. #ifndef min
  162. #define min(a,b)            (((a) < (b)) ? (a) : (b))
  163. #endif
  164.  
  165. #endif  /* NOMINMAX */
  166.  
  167. #define MAKEWORD(a, b)      ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
  168. #define MAKELONG(a, b)      ((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
  169. #define LOWORD(l)           ((WORD)(l))
  170. #define HIWORD(l)           ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
  171. #define LOBYTE(w)           ((BYTE)(w))
  172. #define HIBYTE(w)           ((BYTE)(((WORD)(w) >> 8) & 0xFF))
  173.  
  174. #ifndef WIN_INTERNAL
  175. DECLARE_HANDLE            (HWND);
  176. DECLARE_HANDLE            (HHOOK);
  177. #endif
  178.  
  179. typedef WORD                ATOM;
  180.  
  181. typedef HANDLE NEAR         *SPHANDLE;
  182. typedef HANDLE FAR          *LPHANDLE;
  183. typedef HANDLE              HGLOBAL;
  184. typedef HANDLE              HLOCAL;
  185. typedef HANDLE              GLOBALHANDLE;
  186. typedef HANDLE              LOCALHANDLE;
  187. typedef int (FAR WINAPI *FARPROC)();
  188. typedef int (NEAR WINAPI *NEARPROC)();
  189. typedef int (WINAPI *PROC)();
  190.  
  191. #ifdef STRICT
  192. typedef void NEAR* HGDIOBJ;
  193. #else
  194. DECLARE_HANDLE(HGDIOBJ);
  195. #endif
  196.  
  197. DECLARE_HANDLE(HACCEL);
  198. DECLARE_HANDLE(HBITMAP);
  199. DECLARE_HANDLE(HBRUSH);
  200. #if(WINVER >= 0x0400)
  201. DECLARE_HANDLE(HCOLORSPACE);
  202. #endif /* WINVER >= 0x0400 */
  203. DECLARE_HANDLE(HDC);
  204. DECLARE_HANDLE(HGLRC);          // OpenGL
  205. DECLARE_HANDLE(HDESK);
  206. DECLARE_HANDLE(HENHMETAFILE);
  207. DECLARE_HANDLE(HFONT);
  208. DECLARE_HANDLE(HICON);
  209. DECLARE_HANDLE(HMENU);
  210. DECLARE_HANDLE(HMETAFILE);
  211. DECLARE_HANDLE(HINSTANCE);
  212. typedef HINSTANCE HMODULE;      /* HMODULEs can be used in place of HINSTANCEs */
  213. DECLARE_HANDLE(HPALETTE);
  214. DECLARE_HANDLE(HPEN);
  215. DECLARE_HANDLE(HRGN);
  216. DECLARE_HANDLE(HRSRC);
  217. DECLARE_HANDLE(HSTR);
  218. DECLARE_HANDLE(HTASK);
  219. DECLARE_HANDLE(HWINSTA);
  220. DECLARE_HANDLE(HKL);
  221.  
  222. typedef int HFILE;      
  223. typedef HICON HCURSOR;      /* HICONs & HCURSORs are polymorphic */
  224.  
  225. typedef DWORD   COLORREF;
  226. typedef DWORD   *LPCOLORREF;
  227.  
  228. #define HFILE_ERROR ((HFILE)-1)
  229.  
  230. typedef struct tagRECT
  231. {
  232.     LONG    left;
  233.     LONG    top;
  234.     LONG    right;
  235.     LONG    bottom;
  236. } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
  237.  
  238. typedef const RECT FAR* LPCRECT;
  239.  
  240. typedef struct _RECTL       /* rcl */
  241. {
  242.     LONG    left;
  243.     LONG    top;
  244.     LONG    right;
  245.     LONG    bottom;
  246. } RECTL, *PRECTL, *LPRECTL;
  247.  
  248. typedef const RECTL FAR* LPCRECTL;
  249.  
  250. typedef struct tagPOINT
  251. {
  252.     LONG  x;
  253.     LONG  y;
  254. } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
  255.  
  256. typedef struct _POINTL      /* ptl  */
  257. {
  258.     LONG  x;
  259.     LONG  y;
  260. } POINTL, *PPOINTL;
  261.  
  262. typedef struct tagSIZE
  263. {
  264.     LONG        cx;
  265.     LONG        cy;
  266. } SIZE, *PSIZE, *LPSIZE;
  267.  
  268. typedef SIZE               SIZEL;
  269. typedef SIZE               *PSIZEL, *LPSIZEL;
  270.  
  271. typedef struct tagPOINTS
  272. {
  273.     SHORT   x;
  274.     SHORT   y;
  275. } POINTS, *PPOINTS, *LPPOINTS;
  276.  
  277. /* mode selections for the device mode function */
  278. #define DM_UPDATE           1
  279. #define DM_COPY             2
  280. #define DM_PROMPT           4
  281. #define DM_MODIFY           8
  282.  
  283. #define DM_IN_BUFFER        DM_MODIFY
  284. #define DM_IN_PROMPT        DM_PROMPT
  285. #define DM_OUT_BUFFER       DM_COPY
  286. #define DM_OUT_DEFAULT      DM_UPDATE
  287.  
  288. /* device capabilities indices */
  289. #define DC_FIELDS           1
  290. #define DC_PAPERS           2
  291. #define DC_PAPERSIZE        3
  292. #define DC_MINEXTENT        4
  293. #define DC_MAXEXTENT        5
  294. #define DC_BINS             6
  295. #define DC_DUPLEX           7
  296. #define DC_SIZE             8
  297. #define DC_EXTRA            9
  298. #define DC_VERSION          10
  299. #define DC_DRIVER           11
  300. #define DC_BINNAMES         12
  301. #define DC_ENUMRESOLUTIONS  13
  302. #define DC_FILEDEPENDENCIES 14
  303. #define DC_TRUETYPE         15
  304. #define DC_PAPERNAMES       16
  305. #define DC_ORIENTATION      17
  306. #define DC_COPIES           18
  307.  
  308. #ifdef __cplusplus
  309. }
  310. #endif
  311.  
  312. #endif /* _WINDEF_ */   
  313.